package com.example.dao;


import com.example.pojo.movies.Genre;
import com.example.pojo.movies.Movie;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface MovieDao {
    int deleteByPrimaryKey(Integer id);

    int insert(Movie record);

    int insertSelective(Movie record);

    Movie selectById(Integer id);

    List<Movie> selectAll();

    Movie listResource(@Param("table") String table,
                       @Param("id") String id);

    List<Movie> selectByGenre(String big_genre);

    List<Genre> getGenres(String genre);

    int updateByPrimaryKeySelective(Movie record);

    int updateByPrimaryKey(Movie record);
}